<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>原型对象创建方法案例</title>
</head>
<body>
    <script>
       
        function Clothes() {
            this.type = "黑色的连衣裙是小丽穿的衣服";
        }

   
        var clothes1 = new Clothes();
        var clothes2 = new Clothes();

       
        Clothes.prototype.type = "黄色的吊带裙是小美穿的衣服";

       
        Clothes.prototype.Clothes_fun = function () {
            return this.type + "是小美的衣服是黄色的吊带裙";
        };

        // 输出结果
        console.log(clothes1.type); 
        console.log(clothes2.type); 
        console.log(clothes1.Clothes_fun()); 
    </script>
</body>
</html>